<template>
  <div
    class="header"
    :style="{
      backgroundImage: `url(${sellerIofo.avatar})`,
    }"
  >
    <div class="mask"></div>
    <div class="info">
      <div class="pic">
        <img :src="sellerIofo.avatar" alt="商家logo" />
        </div>
      <div class="title">
        <div class="song">品牌</div>
        <h3 style="color:#fff;">{{ sellerIofo.name }}</h3>      
      <p style="color:#fff ;">{{sellerIofo.description}}/{{sellerIofo.deliveryTime}}送达</p>
      <div class="jia">5个 ></div>
    </div>
    </div>
    <div class="tips">
      <p>
        {{ sellerIofo.bulletin }}
      </p>
    </div>
  </div>
</template>

<script>
import { mapActions, mapState } from "vuex";
export default {
  data() {
    return {
      // bg: this.sellerIofo.avatar,
    };
  },
  created() {
    this.getSeller();
  },
  computed: {
    ...mapState(["sellerIofo"]),
  },
  methods: {
    ...mapActions(["getSeller", "getGoods"]),
  },
};
</script>

<style lang="less" scoped>
.header {
  height: 134px;
  background: #333;
  overflow: hidden;
  background-repeat: no-repeat;
  background-size: cover;
  position: relative;
  .mask {
    position: absolute;
    width: 100%;
    left: 0;
    top: 0;
    height: 100%;
    background-color: rgba(7, 17, 27, 0.5);
    backdrop-filter: blur(10px);
   
  }
  .info {
    position: absolute;
    width: 100%;
    left: 0;
    top: 0;
    height: 100%;
    display: flex;
    margin: 24px 24px 24px 24px;
    // float: left;
    .pic {
      width: 64px;
      img {
        width: 64px;
      }
    }
    .title{
      
      margin-left:16px ;
      position: relative;
      
    }
    .jia{
      border-radius: 50%;
      width: 40px;
      height: 24px;
      background-color: aqua;
      text-align: center;
      position: absolute;
      top: 43px;
      right: -85px;
      color: rgb(255,255,255);
      background-color: rgba(0,0,0,0.2);
      font-size: 10px;
      line-height: 24px;
      font-weight: 200;
    }
    .song{
      background-color: red;
      width: 32px;
      height: 20px;
      color: #fff;
      text-align: center;
    }
    
  }
  .tips {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    font-size: 10px;
    color: #fff;
    padding-left: 12px;
    background: rgba(7, 17, 27, 0.2);

    p {
      height: 28px;
      line-height: 28px;
      width: 85%;
      text-overflow: ellipsis;
      white-space: nowrap;
      overflow: hidden;
      &::before {
        content: "公告";
      }
    }
  }
}
</style>
